home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / news / thor / rexx / golded / style.ged < prev    next >
Text File  |  1998-05-24  |  721b  |  40 lines

  1. /* Style.ged by Troels Walsted Hansen
  2. ** $VER: Style.ged 1.0 (9.6.95)
  3. **
  4. ** Purpose: Apply style to word.
  5. */
  6.  
  7. options results
  8. parse arg stylechar
  9.  
  10. /* needs GoldED functions */
  11.  
  12. p = address() || ' ' || show('P',,)
  13. portname = pos('GOLDED.',p)
  14.  
  15. if portname > 0 then portname = word(substr(p,portname),1)
  16. else
  17. do
  18.     say 'No GoldED port found!'
  19.     exit 10
  20. end
  21.  
  22. address(portname)
  23.  
  24. REQLIST ENTRY '"Bold"' '"Italic"' '"Reverse"' '"Underline"' VAR result TITLE '"Select style"'
  25.  
  26. select
  27.     when(result = 0) then stylechar = '*'
  28.     when(result = 1) then stylechar = '/'
  29.     when(result = 2) then stylechar = '#'
  30.     when(result = 3) then stylechar = '_'
  31.     otherwise exit
  32. end
  33.  
  34. PREV
  35. FIX VAR stylechar
  36. TEXT T stylechar
  37. ENDWORD
  38. RIGHT
  39. TEXT T stylechar
  40.